home *** CD-ROM | disk | FTP | other *** search
/ CD BIT 75 / CD BIT 75.iso / Software / ooo / f_0020 / sbasic.jar / text / sbasic / common / 03010201.xml < prev    next >
Encoding:
Extensible Markup Language  |  2003-08-01  |  4.6 KB  |  33 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <html><head><title>InputBox Function [Runtime]</title><meta name="filename" content="text/sbasic/common/03010201"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
  3.  
  4.         p.P1{
  5.                 }
  6.         span.T1{
  7.                 font-weight:bold;}
  8.         </style></head><body>
  9.   
  10.   
  11.   <help:paragraphinfo state="E" xmlns:help="http://openoffice.org/2000/help"/><help:to-be-embedded Eid="inputbox" xmlns:help="http://openoffice.org/2000/help">
  12.   <p class="Head1"><help:paragraphinfo state="U" number="1"/><help:key-word value="InputBox; function" tag="kw66617_1"/><help:link Id="66617">InputBox Function [Runtime]</help:link></p>
  13.   <p class="Paragraph"><help:paragraphinfo state="U" number="2"/>Displays a prompt in a dialog at which the user can input text. The input is assigned to a variable.</p>
  14.   <help:paragraphinfo state="E"/></help:to-be-embedded>
  15.   <p class="Paragraph"><help:paragraphinfo state="U" number="3" xmlns:help="http://openoffice.org/2000/help"/>The <span class="T1">InputBox</span> statement is a convenient method of entering text through a dialog. Confirm the input by clicking OK or pressing Return. The input is returned as the function return value. If you close the dialog with Cancel, <span class="T1">InputBox</span> returns a zero-length string ("").</p>
  16.   <p class="Head2"><help:paragraphinfo state="U" number="4" xmlns:help="http://openoffice.org/2000/help"/>Syntax:</p>
  17.   <p class="PropText"><help:paragraphinfo state="U" number="5" xmlns:help="http://openoffice.org/2000/help"/>InputBox (Msg As String[, Title As String[, Default As String[, x_pos As Integer, y_pos As Integer]]]]) </p>
  18.   <p class="Head2"><help:paragraphinfo state="U" number="6" xmlns:help="http://openoffice.org/2000/help"/>Return value:</p>
  19.   <p class="Paragraph"><help:paragraphinfo state="U" number="7" xmlns:help="http://openoffice.org/2000/help"/>String</p>
  20.   <p class="Head2"><help:paragraphinfo state="U" number="8" xmlns:help="http://openoffice.org/2000/help"/>Parameter:</p>
  21.   <p class="Paragraph"><help:paragraphinfo state="U" number="9" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Msg</span>: String expression displayed as the message in the dialog box.</p>
  22.   <p class="Paragraph"><help:paragraphinfo state="U" number="10" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Title</span>: String expression displayed in the title bar of the dialog box.</p>
  23.   <p class="Paragraph"><help:paragraphinfo state="U" number="11" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Default</span>: String expression displayed in the text box as default if no other input is given.</p>
  24.   <p class="Paragraph"><help:paragraphinfo state="U" number="12" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">x_pos</span>: Integer expression that specifies the horizontal position of the dialog. The position is an absolute coordinate and does not refer to the window of the office application.</p>
  25.   <p class="Paragraph"><help:paragraphinfo state="U" number="13" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">y_pos</span>: Integer expression that specifies the vertical position of the dialog. The position is an absolute coordinate and does not refer to the window of the office application.</p>
  26.   <p class="Paragraph"><help:paragraphinfo state="U" number="14" xmlns:help="http://openoffice.org/2000/help"/>If <span class="T1">x_pos</span> and <span class="T1">y_pos</span> are omitted, the dialog is centered on the screen. The position is specified in <help:popup Id="66636" Eid="twips" xmlns:help="http://openoffice.org/2000/help">twips</help:popup>.</p>
  27.   <p class="Head2"><help:paragraphinfo state="U" number="15" xmlns:help="http://openoffice.org/2000/help"/>Example:</p>
  28.   <p class="PropText"><help:paragraphinfo state="U" number="16" xmlns:help="http://openoffice.org/2000/help"/>Sub ExampleInputBox</p>
  29.   <p class="PropText"><help:paragraphinfo state="U" number="17" xmlns:help="http://openoffice.org/2000/help"/>Dim sText As String</p>
  30.   <p class="PropText"><help:paragraphinfo state="U" number="18" xmlns:help="http://openoffice.org/2000/help"/>sText <text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/>= InputBox ("Please enter a phrase:","Dear User")</p>
  31.   <p class="PropText"><help:paragraphinfo state="U" number="19" xmlns:help="http://openoffice.org/2000/help"/>MsgBox ( sText , 64, "Confirmation of phrase")</p>
  32.   <p class="PropText"><help:paragraphinfo state="U" number="20" xmlns:help="http://openoffice.org/2000/help"/>End Sub</p>
  33.  </body></html>